#ifndef COMMANDHANDLER_H
#define COMMANDHANDLER_H

#include <string>
#include <SQLiteCpp/SQLiteCpp.h>
#include "infos.h"

// 前向声明，避免包含 session.h
class Session;

class CommandHandler
{
public:
    static void Regist(int account, std::string password, std::string name, 
                     Session* session, SQLite::Database& db);
    static void Login(int account, std::string password, Session* session, SQLite::Database& db);
    static void Search(std::string info, Session* session, SQLite::Database& db);
    static void GroupSearch(std::string info, Session* session, SQLite::Database& db);
    static void AddFriendRequest(UserInfo info, int account, std::string sendmsg,
                               Session* session, SQLite::Database& db);
    static void FriendList(int account, Session* session, SQLite::Database& db);
    static void GroupList(int account, Session* session, SQLite::Database& db);
    static void GroupJoinReguest(UserInfo info, int group_account, std::string group_name,
                               std::string sendmsg, Session* session, SQLite::Database& db);
    static void GroupChat(int account, std::string sendmsg, int group_account,
                         Session* session, SQLite::Database& db);
    static void GroupMemberList(int account, Session* session, SQLite::Database& db);
};

#endif